package groupon.commom.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@MappedSuperclass
public class StatefulEntity implements Serializable{
	
	private static final long serialVersionUID = 1L;

	@Column(name = "is_active")
	private boolean active = true;
	
	@Column(name = "created_date")
	@Temporal(TemporalType.TIMESTAMP)
    private Date createdDate;
	@Column(name = "modified_date")
    private Date modifiedDate;
	@Column(name = "created_by")
    private String createdBy;
	@Column(name = "modified_by")
    private String modifiedBy;
	@Column(name = "is_deleted")
    private boolean deleted;
   
	public boolean isActive() {
		return active;
	}
	public void setActive(boolean active) {
		this.active = active;
	}
	
	public Date getCreatedDate() {
		return createdDate;
	}
	public void setCreatedDate(Date createdDate) {
		this.createdDate = createdDate;
	}
	
	public Date getModifiedDate() {
		return 
				modifiedDate;
	}
	public void setModifiedDate(Date modifiedDate) {
		this.modifiedDate = modifiedDate;
	}
	
	public String getCreatedBy() {
		return createdBy;
	}
	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}
	
	public String getModifiedBy() {
		return modifiedBy;
	}
	public void setModifiedBy(String modifiedBy) {
		this.modifiedBy = modifiedBy;
	}
	
	public boolean isDeleted() {
		return deleted;
	}
	
	public void setDeleted(boolean deleted) {
		this.deleted = deleted;
	}
}
